package com.hjc.service.user;

import com.hjc.dao.user.ProviderMapper;
import com.hjc.entity.Bill;
import com.hjc.entity.Provider;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Scope("prototype")
@Service("providerService")
public class ProviderSericeImpl implements ProviderService {

    @Autowired
    public ProviderMapper providerService;//声明ProviderService接口的引用

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Provider> Listinfo() {

        return providerService.providerList();
    }

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Provider> finproviderListcha(Provider provider) {
        return providerService.providerListcha(provider);
    }

    @Override
    public int addinfo(Provider provider) {
        return providerService.addInfo(provider);
    }

    @Override
    public int xiugaigongyingshang(Provider provider) {
        return providerService.xiugaiinfo(provider);
    }

    @Override
    public int delInfo(Provider provider) {
        return providerService.deleteinfo(provider);
    }

}
